home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
contro2r
/
form3.frm
< prev
next >
Wrap
Text File
|
1999-04-06
|
3KB
|
98 lines
VERSION 5.00
Begin VB.Form Form3
BorderStyle = 1 'Fixed Single
Caption = "FindFirst"
ClientHeight = 855
ClientLeft = 45
ClientTop = 330
ClientWidth = 4695
LinkTopic = "Form3"
MaxButton = 0 'False
ScaleHeight = 855
ScaleWidth = 4695
StartUpPosition = 3 'Windows Default
Begin VB.OptionButton Option4
Caption = "FindPrevious"
Height = 195
Left = 3360
TabIndex = 5
Top = 120
Width = 1215
End
Begin VB.OptionButton Option3
Caption = "FindNext"
Height = 195
Left = 2280
TabIndex = 4
Top = 120
Width = 975
End
Begin VB.OptionButton Option2
Caption = "FindLast"
Height = 195
Left = 1200
TabIndex = 3
Top = 120
Width = 975
End
Begin VB.OptionButton Option1
Caption = "FindFirst"
Height = 195
Left = 120
TabIndex = 2
Top = 120
Value = -1 'True
Width = 975
End
Begin VB.CommandButton findit
Caption = "&Find"
Height = 375
Left = 3600
TabIndex = 1
Top = 360
Width = 975
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "Times New Roman"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 0
Top = 360
Width = 3255
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub findit_Click()
Dim x As String
x = "FileName" & "" & "='" & Text1.Text & ".ico'"
If Option1.Value = True Then Form1.Data1.Recordset.FindFirst x
If Option2.Value = True Then Form1.Data1.Recordset.FindLast x
If Option3.Value = True Then Form1.Data1.Recordset.FindNext x
If Option4.Value = True Then Form1.Data1.Recordset.FindPrevious x
If Form1.Data1.Recordset.NoMatch Then
MsgBox "No such record found", vbInformation, "dyr_workshop"
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
x = "FileName" & "" & "='" & Text1.Text & Chr(KeyAscii) & ".ico'"
If Option1.Value = True Then Form1.Data1.Recordset.FindFirst x
If Option2.Value = True Then Form1.Data1.Recordset.FindLast x
If Option3.Value = True Then Form1.Data1.Recordset.FindNext x
If Option4.Value = True Then Form1.Data1.Recordset.FindPrevious x
End Sub